// list页面JS相关
window.onload = function(){
    //console.log('123');
    //定义一个字符串变量
    let str = ``;
    //请求ajax
    $.ajax({
        url:'https://cache.iminutes.cn/api/soft/softdata.html',
        type:"GET",
        data:{},
        dataType:'json',
        success:(res)=>{
            console.log(res);
            if(res.status){
                //拼接
                if(res.data.length>0){
                    $.each(res.data,function(index,val){
                        console.log(val.title);
                        str += `
                        <li>
                            <a href="content.html?aid=${val.aid}&cid=20">
                                <span class="sdate">${val.newtime}</span>
                                <span class="listing_lmt_cv">${val.title}</span>
                            </a>
                        </li>
                        `;
                    });
                    document.querySelector('.listing_zone').innerHTML= str;
                }
            }else{
                alert('请求失败!');
            }
        }
    });
}


